package com.shop.admin.dao.user;

import com.shop.jpa.BaseDao;
import com.shop.domain.user.StatUserChief;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface StatUserChiefDao extends BaseDao<StatUserChief, Long> {


    @Query(nativeQuery = true, value = "select ifnull(SUM(chief_num),0) from t_stat_user_chief where uid=?1 ")
    int queryShiefNumByUid(Long userId);


}
